﻿
<!DOCTYPE html>
<html class="x-admin-sm">

<head>
    <meta charset="UTF-8">
    <title>生产计划创建</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <link href="~/js/layui/css/layui.css" rel="stylesheet" />
    <link href="~/X-admin/css/font.css" rel="stylesheet" />
    <script src="~/X-admin/lib/layui/layui.all.js"></script>
    <link href="~/X-admin/css/xadmin.css" rel="stylesheet" />
    <script src="~/X-admin/js/jquery.min.js"></script>
    <script src="~/X-admin/js/xadmin.js"></script>
    <script src="~/js/framework/sysframework.js"></script>
  
</head>
<body>
    <ul lay-bar="disabled" class="mWebBanner">
        <li class="layui-nav-item" style="float:left;">
            <button type="button" onclick="SaveBanGunPro()" class="buttonCss">
                <i class="layui-icon" style="margin-right:3px">&#x1005;</i>确 定
            </button>
        </li>
        <li class="layui-nav-item" style="float:left;margin-left:3%">
            <button type="button" onclick="closeWin()" class="buttonCss">
                <i class="layui-icon" style="margin-right:3px">&#x1007;</i>关闭页面
            </button>
        </li>
    </ul>
    <div class="layui-card" style="margin-top:1%;padding-top:2%">
        <form id="qForm" name="qForm">
            <div class="layui-form-item" style="margin-left:2%">
       
                <div class="layui-input-inline">
                    <textarea placeholder="请输入内容" class="layui-textarea" name="barCodes" id="barCodes" style="width:495%" readonly></textarea>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-group" style="float:left;margin-left:2%">
                    <div class="layui-input-prefix">
                      关联存货
                    </div>
                    <input type="text" id="proName" name="proName" class="layui-input" style="width:470%">
                    <div class="layui-input-suffix" style="cursor: pointer;padding-left:233%" onclick="chooseProduct()">
                        <i class="layui-icon layui-icon-more-vertical"></i>
                    </div>
                </div>
               
            </div>
            <input type="hidden" name="proCode" id="proCode" />
        </form>

        <div class="layui-card-body layui-table-body layui-table-main" id="layui-table-main">
            <table class="layui-hide" id="list" lay-filter="list"></table>
        </div>
   
    </div>

</body>
</html>


<script>
    // var webCode = "";

    var barCodes = "";
    $(function () {
        barCodes = getUrlVariable("barCodes");
        $('#barCodes').val(barCodes);
     
    })

    var cData = new Array();
    function chooseProduct() {
            let url = "../Basic/SelectInventory?isSingle=1";
            InfoOpenPage(url, "存货选择", "95%", "90%");
    }
    /**
    * 存货参数获取
    * **/
    function getChildPar(pars) {
        if (pars != undefined) {
            $("input[ name='proName']").val(pars[0].proName);
            $("input[ name='proCode']").val(pars[0].proCode);
     
        }
    }

    /**
    * 保存版辊存货配置
    * **/
    function SaveBanGunPro() {
        $.ajax({
            url: "../Basic/SaveBanGunPro",
            data: { datas: JSON.stringify(FormToJson("qForm")) },
            type: "post",
            success: function (rsl) {
                if (rsl.result) {
                    layer.msg("保存成功");
                } else {
                    layer.msg(rsl.message);
                }
            }
        });
    }



</script>

